package com.antu.first.web.frontend;

import com.antu.first.bean.Hotel;
import com.antu.first.bean.Room;
import com.antu.first.dao.HotelDao;
import com.antu.first.dao.RoomDao;
import com.antu.first.dao.RoomTypeDao;
import com.antu.first.dao.SwiperDao;
import com.antu.first.dto.HotelConditions;
import com.antu.first.service.HotelService;
import jdk.internal.org.objectweb.asm.Handle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/3/8.
 */
@Controller
@RequestMapping("/user/hotelInfo")
public class MobileHotelInformation {
    @Autowired
    HotelDao hotelDao;
    @Autowired
    RoomDao roomDao;
    @Autowired
    SwiperDao swiperDao;
    @Autowired
    RoomTypeDao roomTypeDao;
    @Autowired
    HotelService hotelService;
    Map<String,Object> map;
    /**
     * 移动端进入到酒店详情页
     */
    @RequestMapping(value = "/hotelInformation",method = RequestMethod.GET)
    @ResponseBody
    public Map<String,Object> hotelInformation(Integer hotelId){
        return hotelService.hotelInformation(hotelId);
    }

    /**
     * 多添件查询酒店(也是首页请求地址)
     * @param hotelConditions
     * @return
     */
    @RequestMapping(value = "/searchHotels",method = RequestMethod.GET)
    @ResponseBody
    public Map<String,Object> searchHotel(HotelConditions hotelConditions){
        return hotelService.searchHotel(hotelConditions);
    }

}
